<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=EDGE"/>
	<meta name="apple-mobile-web-app-capable" content="yes">
	<!--<meta name="viewport"-->
	<!--content="width=device-width,initial-scale=1,user-scalable=no,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0"/>-->
	<meta name="HandheldFriendly" content="false">
	<meta name="format-detection" content="telephone=no"/>
	<meta name="renderer" content="webkit"/>
	<title>{block name="title"}{/block} - <?php echo APP_NAME; ?></title>
	{load href="//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"}
	<!--{load href="/jquery.2.1.4.min.js"}-->
	<link rel="stylesheet" type="text/css" href="/layui/css/layui.css?{:VER}"/>
	<script type='text/javascript' src='/layui/layui.js?{:VER}'></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
	{block name="header"}{:widget('Widget/Header')}{/block}
	{block name="left"}{:widget('Widget/Left')}{/block}
	{block name="container"}
	<div class="layui-body">
		<div style="padding: 15px">
			{block name="body"}{/block}
		</div>
	</div>
	{/block}
	{block name="footer"}{:widget('Widget/Footer')}{/block}
</div>
<script>
	layui.use(['element', 'layer'], function () {
		var element = layui.element;
		var layer = layui.layer;

		$.ajax({
			type: "POST",
			url: "/backend/system/getMessage",
			cache: false,
			data: {
				type: 2,
				forType: 1
			},
			dataType: "json",
			success: function (e) {
				if (Number(e.data.count) > 0) {
					layer.open({
						anim: 2,
						offset: 'rb',
						id: "tips",
						btn: "",
						shade: 0,
						time: 10000,
						content: "有新的通知，<a href='/backend/system/message' style='color: #529ec9;'>传送门</a>"
					});
				}
			}
		});
		element.init();
	});
</script>
</body>
</html>